<script setup>
import {useStore} from 'vuex'
let score = useStore()
let { state } = score;
let { count } = score.state;
</script>

<template>
  <main>
    <hr>
    <p>count：{{ count }}</p>
    <p>state.count：{{ state.count }}</p>
    <p>score.state.count：{{ score.state.count }}</p>
    <button @click="score.state.count++">score.state.count++</button>
    <br>
    <button @click="count++">count++</button>
    <br>
    <button @click="state.count++">state.count++</button>
    <br>
    <button @click="score.commit('addScore', 5)">addScore</button>
  </main>
</template>
